<?php

namespace ticket\modules\backend\models;

use Yii;

/**
 * This is the model class for table "tk_coupon_config".
 *
 * @property int $cid
 * @property int $app_id 实例id
 * @property int $coupon_id 应用中心优惠券id
 * @property string $achieve_money 达到多少金额
 * @property int $coupon_num 发送门票数量
 * @property string $online_time 上线时间
 * @property string $offline_time 下线时间
 * @property string $create_time 创建时间
 */
class CouponConfig extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'tk_coupon_config';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['app_id', 'coupon_id', 'achieve_money', 'coupon_num'], 'required'],
            [['app_id', 'coupon_id', 'coupon_num'], 'integer'],
            [['achieve_money'], 'number'],
            [['online_time', 'offline_time', 'create_time'], 'safe'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'cid' => 'Cid',
            'app_id' => 'App ID',
            'coupon_id' => 'Coupon ID',
            'achieve_money' => 'Achieve Money',
            'coupon_num' => 'Coupon Num',
            'online_time' => 'Online Time',
            'offline_time' => 'Offline Time',
            'create_time' => 'Create Time',
        ];
    }
}
